﻿using com.iot.core.annotation;
using com.iot.core.data;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; 

namespace com.iot.ht.Controllers.htsql.data
{
    [Schema(Name = "SQl执行历史", Description = "")]     
    public class HtSqlRun : BaseEntity
    {
         
        [Comment("内容编号")]
        [Schema(Name = "内容编号", Description = "")]
        [Required(ErrorMessage = "{0}不能为空")]
        public long HtsqlitemId { get; set; }
          

        [Comment("参数1")]
        [Schema(Name = "参数2", Description = "")] 
        [MaxLength(200)]
        public string P1  { get; set; } = "";

        [Comment("参数2")]
        [Schema(Name = "参数2", Description = "")]
        [MaxLength(200)]
        public string P2 { get; set; } = "";

        [Comment("参数3")]
        [Schema(Name = "参数3", Description = "")]
        [MaxLength(200)]
        public string P3 { get; set; } = "";

        [Comment("参数4")]
        [Schema(Name = "参数4", Description = "")]
        [MaxLength(200)]
        public string P4 { get; set; } = "";


        [Comment("备份Sql")]
        [Schema(Name = "备份Sql", Description = "")] 
        [MaxLength(2000)]
        public string BkSql { get; set; } = "";



        [Comment("执行Sql")]
        [Schema(Name = "执行Sql", Description = "")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(2000)]
        public string RunSql { get; set; } = "";



        [Comment("备份Sql")]
        [Schema(Name = "备份Sql", Description = "")] 
        public string BkData{ get; set; } = "";


        [Comment("影响记录数")]
        [Schema(Name = "影响记录数", Description = "")]
        public int RowCount { get; set; }  

        [Comment("耗时")]
        [Schema(Name = "耗时", Description = "毫秒")]
        public int Mseconds { get; set; }  

        

        [Comment("创建日期")]
        [Schema(Name = "创建日期", Description = "")]
        public DateTime CrtDt { get; set; }


        [Comment("创建人编号")]
        [Schema(Name = "创建人编号", Description = "")]
        public long CrtUid { get; set; }


        [Comment("机构编号")]
        [Schema(Name = "机构编号", Description = "")]
        public long CrtDid { get; set; }

 

    }
}
